package models;

import play.db.jpa.Model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: bicho
 * Date: 20/01/12
 * Time: 22:53
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "document_type")
public class DocumentType extends Model{

    @Column(name = "name")
    public String name;

    @OneToMany(mappedBy = "documentType")
    public List<PersonDocument> personDocuments;

    @Override
    public String toString() {
        return name;
    }
}
